In a typical computer system, a software operating system is configured to execute on system hardware. The operating system supports execution of user applications by providing an abstracted programmatic interface for using the system hardware (e.g., processor, memory, peripherals, etc.). Generally, the parts of the operating system providing this interface are referred to as the “kernel,” or core, of the operating system.
Because user applications rely heavily on kernel functionality, it is important that the kernel contain as few “bugs” (i.e., programmatic errors), as possible. In particular, a kernel-level bug may result in failure of a user application and/or a failure of the operating system itself. In some cases, a failure of the operating system (sometimes referred to as an operating system “crash,” or “kernel panic”) may be so severe as to require restarting of the system hardware. Further, if a bug exists in an initialization instruction of the kernel, it may not be possible to fully initialize the operating system. Moreover, in some cases, a kernel-level bug may introduce data corruption into a user dataset, e.g., by erroneously writing to a memory location where the user dataset is stored. In such cases, the data corruption may not be immediately detected and/or may result in corrupt data being written to persistent storage. Accordingly, detrimental effects of the kernel-level bug may not be manifested until well after the kernel level-bug actually occurs.
To troubleshoot a kernel-level bug, a software breakpoint facility is typically used. Breakpoints are software instructions used to transfer execution flow to a software module referred to as a “breakpoint handler.” A particular instruction is specified for the breakpoint, and when that instruction is reached, the breakpoint handler is executed. Specifically, the breakpoint handler executes diagnostic instructions to aid in identifying the source of the kernel-level bug.
In some cases, numerous instructions may be identified as potential sources of a kernel-level bug. Specifically, in such cases, due to the number of instructions in question, creating a breakpoint for each possible source of the kernel-level bug may be prohibitively time-consuming.